﻿//
// Created by Administrator on 25-9-4.
//

#ifndef LIST_H
#define LIST_H
template <typename E>
class list {
public:
    virtual ~list() = default;
    virtual void add(E *e) = 0;
    virtual void add(E e) = 0;
    virtual void add(E& e) = 0;
    virtual void ist(int index, E *e) = 0;
    virtual void ist(int index, E e) = 0;
    virtual void ist(int index, E& e) = 0;
    virtual void del(int index) = 0;


    virtual E get(int index) = 0;
    virtual E& get_r(int index) = 0;
    virtual E* get_p(int index) = 0;

    virtual int size() = 0;

    virtual void sort(int (*compare) (E, E)) = 0;
    virtual list<E>& find(int (*cdt) (E, E)) = 0;
};
#endif //LIST_H
